<template>
    <div class="p-2">
        <div class="title-item">检验任务</div>
        <div>
            <el-table :data="tableData" height="300">
                <el-table-column prop="reportNo" label="任务类型" width="100" align="center" />
                <el-table-column prop="sampleNo" label="项目名称" width="180" align="center" />
                <el-table-column prop="inspectionItem" label="负责人" width="150" align="center" />
                <el-table-column prop="reportDate" label="创建时间" width="150" align="center" />
                <el-table-column prop="status" label="任务状态" width="150" align="center">
                    <template #default="scope">
                        <el-tag :type="statusTypeMap[scope.row.status]">
                            {{ scope.row.status }}
                        </el-tag>
                    </template>
                </el-table-column>
                <el-table-column label="操作" width="150" align="center">
                    <template #default>
                        <el-button size="small" type="primary" text>查看</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            statusTypeMap: {
                '已完成': 'success',
                '审核中': 'warning',
                '未生成': 'info',
                '已驳回': 'danger'
            },
         
            tableData: [
                {
                    reportNo: '检测任务',      
                    sampleNo: '城市水质监测项目',
                    inspectionItem: '张三',   
                    reportDate: '2023-05-03 09:15',
                    status: '已完成'        
                },
                {
                    reportNo: '检测任务',
                    sampleNo: '工业园区空气治理项目',
                    inspectionItem: '李四',
                    reportDate: '2023-05-02 14:30',
                    status: '审核中'
                },
                {
                    reportNo: '采样任务',
                    sampleNo: '农田土壤质量调查项目',
                    inspectionItem: '王五',
                    reportDate: '2023-05-04 10:00',
                    status: '未开始'
                },
                {
                    reportNo: '检测任务',
                    sampleNo: '食品安全生产抽检项目',
                    inspectionItem: '赵六',
                    reportDate: '2023-05-01 08:45',
                    status: '已驳回'
                },
                {
                    reportNo: '采样任务',
                    sampleNo: '河流生态环境监测项目',
                    inspectionItem: '孙七',
                    reportDate: '2023-05-08 11:20',
                    status: '已完成'
                },
                {
                    reportNo: '审核任务',
                    sampleNo: '化妆品成分合规审查项目',
                    inspectionItem: '周八',
                    reportDate: '2023-05-03 15:50',
                    status: '审核中'
                },
                {
                    reportNo: '检测任务',
                    sampleNo: '汽车尾气排放检测项目',
                    inspectionItem: '吴九',
                    reportDate: '2023-05-02 09:30',
                    status: '已完成'
                },
                {
                    reportNo: '采样任务',
                    sampleNo: '森林土壤碳储量调查项目',
                    inspectionItem: '郑十',
                    reportDate: '2023-05-04 13:10',
                    status: '未开始'
                },
                {
                    reportNo: '审核任务',
                    sampleNo: '药品质量追溯审查项目',
                    inspectionItem: '钱一',
                    reportDate: '2023-05-01 16:25',
                    status: '已驳回'
                },
                {
                    reportNo: '检测任务',
                    sampleNo: '饮用水源地安全监测项目',
                    inspectionItem: '冯二',
                    reportDate: '2023-05-08 14:40',
                    status: '已完成'
                },
                {
                    reportNo: '采样任务',
                    sampleNo: '工业废水排放核查项目',
                    inspectionItem: '陈三',
                    reportDate: '2023-05-03 10:55',
                    status: '审核中'
                },
                {
                    reportNo: '审核任务',
                    sampleNo: '农产品农药残留审查项目',
                    inspectionItem: '褚四',
                    reportDate: '2023-05-02 11:30',
                    status: '已完成'
                }
            ]
        }
    },
    computed: {

    },
    mounted() {

    }
}
</script>




<style scoped lang="scss">
.title-item {
    font-size: 14px;
    color: #666;
    margin: 10px;
    margin-top: 20px;

}
</style>